<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>wickr-crypto-c: src/wickrcrypto/include/wickrcrypto/devinfo.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">wickr-crypto-c
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_92a70b6cc7e213c660915fdf1190028f.html">wickrcrypto</a></li><li class="navelem"><a class="el" href="dir_db4377ef08cfba82f5e7141624102360.html">include</a></li><li class="navelem"><a class="el" href="dir_2adb4122f2f58e588d09641dee9865e2.html">wickrcrypto</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">devinfo.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright © 2012-2018 Wickr Inc.  All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * This code is being released for EDUCATIONAL, ACADEMIC, AND CODE REVIEW PURPOSES</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * ONLY.  COMMERCIAL USE OF THE CODE IS EXPRESSLY PROHIBITED.  For additional details,</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * please see LICENSE</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * THE CODE IS MADE AVAILABLE &quot;AS-IS&quot; AND WITHOUT ANY EXPRESS OR</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * IMPLIED GUARANTEES AS TO FITNESS, MERCHANTABILITY, NON-</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * INFRINGEMENT OR OTHERWISE. IT IS NOT BEING PROVIDED IN TRADE BUT ON</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * A VOLUNTARY BASIS ON BEHALF OF THE AUTHOR’S PART FOR THE BENEFIT</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * OF THE LICENSEE AND IS NOT MADE AVAILABLE FOR CONSUMER USE OR ANY</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * OTHER USE OUTSIDE THE TERMS OF THIS LICENSE. ANYONE ACCESSING THE</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * CODE SHOULD HAVE THE REQUISITE EXPERTISE TO SECURE THEIR SYSTEM</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * AND DEVICES AND TO ACCESS AND USE THE CODE FOR REVIEW PURPOSES</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * ONLY. LICENSEE BEARS THE RISK OF ACCESSING AND USING THE CODE. IN</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * PARTICULAR, AUTHOR BEARS NO LIABILITY FOR ANY INTERFERENCE WITH OR</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * ADVERSE EFFECT THAT MAY OCCUR AS A RESULT OF THE LICENSEE</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * ACCESSING AND/OR USING THE CODE ON LICENSEE’S SYSTEM.</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#ifndef devinfo_h</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#define devinfo_h</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &lt;stdlib.h&gt;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;buffer.h&quot;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;crypto_engine.h&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="structwickr__dev__info.html">   58</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structwickr__dev__info.html">wickr_dev_info</a> {</div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="structwickr__dev__info.html#a78032877515c2b4cf67c48e4eb6fb0f7">   59</a></span>&#160;    <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="structwickr__dev__info.html#a78032877515c2b4cf67c48e4eb6fb0f7">dev_salt</a>;</div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="structwickr__dev__info.html#a084d0cd9e73d9f74f62c9e9abb85436f">   60</a></span>&#160;    <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="structwickr__dev__info.html#a084d0cd9e73d9f74f62c9e9abb85436f">system_salt</a>;</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="structwickr__dev__info.html#a864ad03c4d10f51fe6251059007276d2">   61</a></span>&#160;    <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="structwickr__dev__info.html#a864ad03c4d10f51fe6251059007276d2">msg_proto_id</a>;</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="structwickr__dev__info.html#af5f2ff06ae74fcec85106f6ffd77c008">   62</a></span>&#160;    <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="structwickr__dev__info.html#af5f2ff06ae74fcec85106f6ffd77c008">srv_comm_id</a>;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;};</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structwickr__dev__info.html">wickr_dev_info</a> <a class="code" href="structwickr__dev__info.html">wickr_dev_info_t</a>;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<a class="code" href="structwickr__dev__info.html">wickr_dev_info_t</a> *<a class="code" href="group__wickr__dev__info.html#gaadd5ceb4c6ed757440332e8e27109e5e">wickr_dev_info_create</a>(<a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="structwickr__dev__info.html#a78032877515c2b4cf67c48e4eb6fb0f7">dev_salt</a>, <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="structwickr__dev__info.html#a084d0cd9e73d9f74f62c9e9abb85436f">system_salt</a>, <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="structwickr__dev__info.html#a864ad03c4d10f51fe6251059007276d2">msg_proto_id</a>, <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="structwickr__dev__info.html#af5f2ff06ae74fcec85106f6ffd77c008">srv_comm_id</a>);</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<a class="code" href="structwickr__dev__info.html">wickr_dev_info_t</a> *<a class="code" href="group__wickr__dev__info.html#gadbe4731cffb188da317ed9237826ac5d">wickr_dev_info_create_new</a>(<span class="keyword">const</span> <a class="code" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> *crypto, <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *system_id);</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;<a class="code" href="structwickr__dev__info.html">wickr_dev_info_t</a> *<a class="code" href="group__wickr__dev__info.html#ga7f81b96fc222560762d608772b3f44bd">wickr_dev_info_derive</a>(<span class="keyword">const</span> <a class="code" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> *crypto, <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="structwickr__dev__info.html#a78032877515c2b4cf67c48e4eb6fb0f7">dev_salt</a>, <span class="keyword">const</span> <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *system_id);</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<a class="code" href="structwickr__dev__info.html">wickr_dev_info_t</a> *<a class="code" href="group__wickr__dev__info.html#ga1c9d2bdc1778166c49aec43906bb1a83">wickr_dev_info_copy</a>(<span class="keyword">const</span> <a class="code" href="structwickr__dev__info.html">wickr_dev_info_t</a> *info);</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__wickr__dev__info.html#ga09ee324a0e0e6a0451aa53031eecb324">wickr_dev_info_destroy</a>(<a class="code" href="structwickr__dev__info.html">wickr_dev_info_t</a> **info);</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;}</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* devinfo_h */</span><span class="preprocessor"></span></div><div class="ttc" id="group__wickr__dev__info_html_gadbe4731cffb188da317ed9237826ac5d"><div class="ttname"><a href="group__wickr__dev__info.html#gadbe4731cffb188da317ed9237826ac5d">wickr_dev_info_create_new</a></div><div class="ttdeci">wickr_dev_info_t * wickr_dev_info_create_new(const wickr_crypto_engine_t *crypto, const wickr_buffer_t *system_id)</div></div>
<div class="ttc" id="group__wickr__dev__info_html_ga7f81b96fc222560762d608772b3f44bd"><div class="ttname"><a href="group__wickr__dev__info.html#ga7f81b96fc222560762d608772b3f44bd">wickr_dev_info_derive</a></div><div class="ttdeci">wickr_dev_info_t * wickr_dev_info_derive(const wickr_crypto_engine_t *crypto, wickr_buffer_t *dev_salt, const wickr_buffer_t *system_id)</div></div>
<div class="ttc" id="structwickr__dev__info_html_af5f2ff06ae74fcec85106f6ffd77c008"><div class="ttname"><a href="structwickr__dev__info.html#af5f2ff06ae74fcec85106f6ffd77c008">wickr_dev_info::srv_comm_id</a></div><div class="ttdeci">wickr_buffer_t * srv_comm_id</div><div class="ttdef"><b>Definition:</b> devinfo.h:62</div></div>
<div class="ttc" id="structwickr__dev__info_html_a78032877515c2b4cf67c48e4eb6fb0f7"><div class="ttname"><a href="structwickr__dev__info.html#a78032877515c2b4cf67c48e4eb6fb0f7">wickr_dev_info::dev_salt</a></div><div class="ttdeci">wickr_buffer_t * dev_salt</div><div class="ttdef"><b>Definition:</b> devinfo.h:59</div></div>
<div class="ttc" id="group__wickr__dev__info_html_ga1c9d2bdc1778166c49aec43906bb1a83"><div class="ttname"><a href="group__wickr__dev__info.html#ga1c9d2bdc1778166c49aec43906bb1a83">wickr_dev_info_copy</a></div><div class="ttdeci">wickr_dev_info_t * wickr_dev_info_copy(const wickr_dev_info_t *info)</div></div>
<div class="ttc" id="structwickr__buffer_html"><div class="ttname"><a href="structwickr__buffer.html">wickr_buffer</a></div><div class="ttdoc">Represents an array of bytes and the length of the allocation associated with those bytes.</div><div class="ttdef"><b>Definition:</b> buffer.h:51</div></div>
<div class="ttc" id="structwickr__dev__info_html"><div class="ttname"><a href="structwickr__dev__info.html">wickr_dev_info</a></div><div class="ttdoc">Device Information used to make a uniquely identifying set of data for each context running the Wickr...</div><div class="ttdef"><b>Definition:</b> devinfo.h:58</div></div>
<div class="ttc" id="group__wickr__dev__info_html_ga09ee324a0e0e6a0451aa53031eecb324"><div class="ttname"><a href="group__wickr__dev__info.html#ga09ee324a0e0e6a0451aa53031eecb324">wickr_dev_info_destroy</a></div><div class="ttdeci">void wickr_dev_info_destroy(wickr_dev_info_t **info)</div></div>
<div class="ttc" id="structwickr__dev__info_html_a864ad03c4d10f51fe6251059007276d2"><div class="ttname"><a href="structwickr__dev__info.html#a864ad03c4d10f51fe6251059007276d2">wickr_dev_info::msg_proto_id</a></div><div class="ttdeci">wickr_buffer_t * msg_proto_id</div><div class="ttdef"><b>Definition:</b> devinfo.h:61</div></div>
<div class="ttc" id="group__wickr__dev__info_html_gaadd5ceb4c6ed757440332e8e27109e5e"><div class="ttname"><a href="group__wickr__dev__info.html#gaadd5ceb4c6ed757440332e8e27109e5e">wickr_dev_info_create</a></div><div class="ttdeci">wickr_dev_info_t * wickr_dev_info_create(wickr_buffer_t *dev_salt, wickr_buffer_t *system_salt, wickr_buffer_t *msg_proto_id, wickr_buffer_t *srv_comm_id)</div></div>
<div class="ttc" id="structwickr__dev__info_html_a084d0cd9e73d9f74f62c9e9abb85436f"><div class="ttname"><a href="structwickr__dev__info.html#a084d0cd9e73d9f74f62c9e9abb85436f">wickr_dev_info::system_salt</a></div><div class="ttdeci">wickr_buffer_t * system_salt</div><div class="ttdef"><b>Definition:</b> devinfo.h:60</div></div>
<div class="ttc" id="structwickr__crypto__engine_html"><div class="ttname"><a href="structwickr__crypto__engine.html">wickr_crypto_engine</a></div><div class="ttdoc">Interface to a set of cryptographic operations used throughout the library. Currently the default imp...</div><div class="ttdef"><b>Definition:</b> crypto_engine.h:53</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
